package com.yanqu.road.entity.union.cross;

import com.yanqu.road.entity.union.UnionInfo;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class CrossUnionInfo extends UnionInfo {

    //区服
    long serverId;

    //是否跨服商会
    boolean cross;

    //商旗部件
    String unionFlagStr = "";

    //荣誉点
    long honors;


    //缓存
    List<Integer> allFlagList = new ArrayList<>();

    /**
     * 成员历史最高赚钱和
     */
    private BigInteger totalMaxAbility = BigInteger.ZERO;

    private int gradeRankTotalLimit = 0;

    public CrossUnionInfo() {
    }

    public CrossUnionInfo(String unionUid) {
        super(unionUid);
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public boolean isCross() {
        return cross;
    }

    public void setCross(boolean cross) {
        if(this.cross != cross) {
            this.cross = cross;
            setUpdateOption();
        }
    }

    public String getUnionFlagStr() {
        return unionFlagStr;
    }

    public void setUnionFlagStr(String unionFlagStr) {
        if(!Objects.equals(this.unionFlagStr, unionFlagStr)) {
            this.unionFlagStr = unionFlagStr;
            setUpdateOption();
        }
    }

    public long getHonors() {
        return honors;
    }

    public void setHonors(long honors) {
        if(this.honors != honors) {
            this.honors = honors;
            setUpdateOption();
        }
    }

    public List<Integer> getAllFlagList() {
        return allFlagList;
    }

    public void setAllFlagList(List<Integer> allFlagList) {
        this.allFlagList = allFlagList;
    }

    public BigInteger getTotalMaxAbility() {
        return totalMaxAbility;
    }

    public void setTotalMaxAbility(BigInteger totalMaxAbility) {
        this.totalMaxAbility = totalMaxAbility;
    }

    public int getGradeRankTotalLimit() {
        return gradeRankTotalLimit;
    }

    public void setGradeRankTotalLimit(int gradeRankTotalLimit) {
        this.gradeRankTotalLimit = gradeRankTotalLimit;
    }
}
